<?php

/**
 * This is the model class for table "config".
 *
 * The followings are the available columns in table 'config':
 * @property integer $id
 * @property string $sitename
 * @property string $facebook
 * @property string $keywords
 * @property string $youtube
 * @property string $banner
 * @property string $logo
 * @property string $logo_small
 */
class Config extends CActiveRecord
{
	public $bannerfile;
        public $logofile;
        /**
	 * Returns the static model of the specified AR class.
	 * @param string $className active record class name.
	 * @return Config the static model class
	 */
	public static function model($className=__CLASS__)
	{
		return parent::model($className);
	}

	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return 'config';
	}

	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules()
	{
		// NOTE: you should only define rules for those attributes that
		// will receive user inputs.
		return array(
			array('sitename', 'required'),
			array('sitename, facebook, youtube, banner, logo, logo_small', 'length', 'max'=>255),
			array('keywords,description', 'safe'),
                        array('bannerfile,logofile','file','types'=>'jpg, gif, png','allowEmpty'=>true),
			// The following rule is used by search().
			
		);
	}

	/**
	 * @return array relational rules.
	 */
	public function relations()
	{
		// NOTE: you may need to adjust the relation name and the related
		// class name for the relations automatically generated below.
		return array(
		);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(
			'id' => 'ID',
			'sitename' => 'Sitename',
			'facebook' => 'Facebook',
			'keywords' => 'Keywords',
                        'description' => 'Description',
			'youtube' => 'Youtube',
			'banner' => 'Banner',
			'logo' => 'Logo',
			'logo_small' => 'Logo Small',
                        'logofile' => 'Logo',
			'bannerfile' => 'Banner',
		);
	}

	
}